<template>
  <h1>云村</h1>
  <button @click="go">抢购</button>
</template>

<script setup>
import { onMounted } from 'vue'
import axios from 'axios'
axios.interceptors.request.use((config) => {
  config.headers.Authorization = `Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2NDY2NTA2MzQsImlhdCI6MTY0NjA0NTgzNCwiaXNzIjoiUHJvY3VyZW1lbnQgelRhZyIsIm5iZiI6MTY0NjA0NTgzNCwic3ViIjoie1wiaWRcIjo2NzIwNDEsXCJuaWNrX25hbWVcIjpcIuaUtuiXj-Wutl82NzAwXCJ9In0.IsFZirw3G0b05wTJvtbZsQlKY470t0bPhhWao5XYj6g`
  return config
})
const go = () => {
  setInterval(() => {
    axios
      .post('https://app.ztag.vip/v1/apis/goods_orders', { amount: 5, id: 202 })
      .then((res) => {
        console.log(res.data.msg)
      })
  }, 500)
}
onMounted(() => {
  console.log(1)
})
</script>

<style></style>
